package com.zoo.boot.controller;

import com.wf.captcha.utils.CaptchaUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 验证码生成 Controller
 * @Author: WangB
 * @Date: 2021/6/25
 */
@Controller
@RequestMapping("/captcha")
@Api(tags = "CaptchaController",value = "验证码管理")
public class CaptchaController {

    @ApiOperation("生产验证码")
    @GetMapping
    public void captcha(HttpServletRequest request, HttpServletResponse response) throws Exception {
        CaptchaUtil.out(120, 45, 4, request, response);
    }


}
